﻿// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. 
// See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace System.Threading.Actors
{
    [Serializable]
    public class ActorNotFoundException : Exception
    {
        public ActorNotFoundException() : this("Actor not found.")
        { }

        public ActorNotFoundException(String message) : base(message)
        {            
        }

        public ActorNotFoundException(String message, String uniquePathInfo) : this(message)
        {
            UniquePathInfo = uniquePathInfo;
        }

#if !PLIB_HACK
        public ActorNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
#endif

        public String UniquePathInfo { get; set; }
    }


    // For AsyncQueue - tell waiters they won't see anything more.  Kinda like EndOfStreamException.
    [Serializable]
    public class EndOfQueueException : Exception
    {
        public EndOfQueueException()
            : this("No more items will be added to the queue.")
        { }

        public EndOfQueueException(String message)
            : base(message)
        {
        }

#if !PLIB_HACK
        public EndOfQueueException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
#endif
    }
}
